<el-form ref="form" :model="form" :rules="rules" label-width="140px">
    <el-row :gutter="10">
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="客户">
                <el-input clearable v-model="form.GWAKL003" @clear="clearGwak001" :disabled="!isAdd" >
                    <i class="el-icon-search el-input__icon" @click="openGwak" slot="suffix" v-show="isAdd"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="联系人">
                <el-input v-model="form.MMRD010"></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="联系电话">
                <el-input v-model="form.MMRD011"></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="联系地址">
                <el-input v-model="form.MMRD012"></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="服务类型" prop="MMRD001">
                <el-select clearable v-model="form.MMRD001">
                    <el-option v-for="item in selectOptions.mmrd001Options" :label="item.value" :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="产品/设备" prop="MMRD002">
                <el-input clearable v-model="form.MMRD002_NAME" @clear="clearMmrd002">
                    <i class="el-icon-search el-input__icon" @click="openMmrd002" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="产品/设备序列号">
                <el-input v-model="form.MMRD003"></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="故障代码">
                <el-select clearable v-model="form.MMRD013S" multiple>
                    <el-option v-for="item in selectOptions.mmrd013Options"
                               :key="item.code"
                               :label="item.value"
                               :value="item.code">
                    </el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="故障描述">
                <el-input v-model="form.MMRD014"></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="服务日期"  prop="MMRD004">
                <el-date-picker
                        v-model="form.MMRD004"
                        type="date"
                        value-format="yyyy-MM-dd"
                        style="width:100%;">
                </el-date-picker>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="服务时间段">
                <el-select clearable v-model="form.MMRD005">
                    <el-option v-for="item in selectOptions.mmrd005Options" :label="item.value" :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="任务紧急度" prop="MMRD019">
                <el-select clearable v-model="form.MMRD019">
                    <el-option v-for="item in selectOptions.mmrd019Options" :label="item.value" :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="任务状态" prop="MMRD020">
                <el-select clearable v-model="form.MMRD020">
                    <el-option v-for="item in selectOptions.mmrd020Options" :label="item.value" :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="16" :md="16" :lg="16" :xl="16">
            <el-form-item label="受理备注">
                <el-input type="textarea" v-model="form.MMRD028" maxlength="400" ></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <div class="grid-content bg-purple">
                <el-form-item label="故障图片" class="c-upload-text" style="float: left;margin-left:0px;">
                    <el-upload
                            v-if="!isDetail"
                            ref="upload"
                            class="upload-demo"
                            v-model="form.mmrd015_"
                            list-type="picture-card"
                            :action="imgs"
                            :file-list="templateImageUrl"
                            :before-upload="beforeUpload"
                            :on-success="successUpload"
                            :on-preview="handlePreview"
                            :on-remove="handleRemove"
                            :auto-upload="false"
                            :on-success="successUploadImg" multiple
                            >
                    <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisible" :modal-append-to-body="false">
                        <img width="100%" :src="dialogImageUrl" alt="">
                    </el-dialog>
                </el-form-item>
            </div>
        </el-col>
        <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
            <template v-if="isDetail">
                <el-carousel height="150px" indicator-position="none">
                    <el-carousel-item v-for="item in templateImageUrl" :key="item" style="text-align: center">
                        <img :src="item.url" style="height: 100%" @click="bigShow(item.url)">
                    </el-carousel-item>
                </el-carousel>
            </template>
        </el-col>

        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" style="text-align: right">
            <el-button icon="icon iconfont icon-23" size="mini" @click="cancel">关闭</el-button>
            <el-button type="warning" icon="icon iconfont icon-21" size="mini" @click="sure" :disabled="isDetail">保存</el-button>
        </el-col>
    </el-row>
</el-form>
<script>
    require(["pc/crm/gwai740_edit"], $.noop);
</script>
